﻿using Api.Core.Model.Module;
using Api.Core.Model.Role;
using Api.Core.Model.User;
using AutoMapper;

namespace Api.Core.AutoMap
{
    public class ResourceToModelProfile : Profile
    {
        public ResourceToModelProfile()
        {
            CreateMap<UserCredentials, UserEntity>();
            CreateMap<UserEntity, UserCredentials>();
            CreateMap<UserDto, UserEntity>();
            CreateMap<UserEntity, UserDto>();
            CreateMap<UserEntity, RoleEntityDto>();
            CreateMap<RoleEntityDto, UserEntity>();

            CreateMap<RoleDto, RoleEntity>();
            CreateMap<RoleEntity, RoleDto>();

            CreateMap<ModuleEntity, ModuleDto>();
            CreateMap<ModuleDto, ModuleEntity>();
        }
    }
}
